//
//  PrefixHeader.h
//  RLVideo
//
//  Created by raniys on 2018/10/12.
//  Copyright © 2018 raniys. All rights reserved.
//

#ifndef PrefixHeader_h
#define PrefixHeader_h

#define ScreenWidth  [UIScreen mainScreen].bounds.size.width
#define ScreenHeight  [UIScreen mainScreen].bounds.size.height
#define SizeWidth(W) (W *CGRectGetWidth([[UIScreen mainScreen] bounds])/320)
#define SizeHeight(H) (H *(ScreenHeight)/568)

#define RGBToColor(R,G,B)  [UIColor colorWithRed:(R * 1.0) / 255.0 green:(G * 1.0) / 255.0 blue:(B * 1.0) / 255.0 alpha:1.0]
#define rgba(R,G,B,A)  [UIColor colorWithRed:(R * 1.0) / 255.0 green:(G * 1.0) / 255.0 blue:(B * 1.0) / 255.0 alpha:A]

#define BundleID [[NSBundle mainBundle] bundleIdentifier]

#define IS_IPHONEX (([[UIScreen mainScreen] bounds].size.height-812)?NO:YES)
#define SafeTop (([[UIScreen mainScreen] bounds].size.height-812) ? 20 : 44)
#define SafeBottom (([[UIScreen mainScreen] bounds].size.height-812) ? 0 : 43)
#define SafeBeautyBottom (([[UIScreen mainScreen] bounds].size.height-812) ? 0 : 12)
#define StatusBarHeight (([[UIScreen mainScreen] bounds].size.height-812) ? 20 : 44)
#define NoStatusBarSafeTop (IS_IPHONEX ? 44 : 0)

#ifdef DEBUG
# define NSLog(fmt, ...) NSLog((@"\n[File:%s]\n" "[Function:%s]\n" "[Line:%d] \n" fmt), __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define NSLog(...);
#endif

// pushflow
#define AlivcScreenWidth  [UIScreen mainScreen].bounds.size.width
#define AlivcScreenHeight  [UIScreen mainScreen].bounds.size.height
#define AlivcSizeWidth(W) (W*(AlivcScreenWidth)/320)
#define AlivcSizeHeight(H) (H*(AlivcScreenHeight)/568)

#define IPHONEX (AlivcScreenWidth == 375.f && AlivcScreenHeight == 812.f)

#define AlivcRGB(R,G,B)  [UIColor colorWithRed:(R * 1.0) / 255.0 green:(G * 1.0) / 255.0 blue:(B * 1.0) / 255.0 alpha:1.0]
#define AlivcRGBA(R,G,B,A)  [UIColor colorWithRed:(R * 1.0) / 255.0 green:(G * 1.0) / 255.0 blue:(B * 1.0) / 255.0 alpha:A]

#define AlivcOxRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]



#define AlivcUserDefaultsIndentifierFirst @"AlivcUserDefaultsIndentifierFirst"

//二维码界面模块
#define LBXScan_Define_UI
#define LBXScan_Define_Native


#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <CommonFoundation/CommonFoundation.h>
#import "RLVideo-Swift.h"

#endif

#endif /* PrefixHeader_h */
